home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / reportplus / source / f5.c < prev    next >
C/C++ Source or Header  |  2002-10-27  |  73KB  |  1,661 lines

  1. #include <exec/types.h>
  2. #include <clib/exec_protos.h>
  3. #include <intuition/intuition.h>
  4. #include <intuition/gadgetclass.h>
  5. #include <clib/intuition_protos.h>
  6. #include <libraries/gadtools.h>
  7. #include <clib/gadtools_protos.h>
  8. #include <libraries/expansion.h>
  9. #include <libraries/expansionbase.h>
  10. #include <libraries/configvars.h>
  11. #include <clib/expansion_protos.h>
  12. #include <graphics/gfx.h>
  13. #include <clib/graphics_protos.h>
  14. #include <dos/dostags.h>
  15.  
  16. #include <ctype.h>
  17. #include <stdlib.h>
  18. #include "rp.h"
  19. #include "boards.h"
  20.  
  21. #include <reaction/reaction.h>
  22. #include <gadgets/chooser.h>
  23. #include <pragmas/chooser_pragmas.h>
  24. #include <gadgets/string.h>
  25. #include <pragmas/string_pragmas.h>
  26. #include <gadgets/integer.h>
  27. #include <pragmas/integer_pragmas.h>
  28. #include <gadgets/checkbox.h>
  29. #include <pragmas/checkbox_pragmas.h>
  30. #include <gadgets/layout.h>
  31. #include <pragmas/layout_pragmas.h>
  32. #include <gadgets/button.h>
  33. #include <pragmas/button_pragmas.h>
  34. #include <images/label.h>
  35. #include <pragmas/label_pragmas.h>
  36. #include <proto/label.h>
  37. #include <classes/window.h>
  38. #include <pragmas/window_pragmas.h>
  39.  
  40. #define MANUFS 272
  41.  
  42. MODULE  ULONG                 querymanuf,
  43.                               queryproduct,
  44.                               boards,
  45.                               whichboard,
  46.                               precedence;
  47. MODULE  UWORD                 selectedmanuf   = 0,
  48.                               selectedproduct = 0;
  49. MODULE  struct ExpansionBase* ExpansionBase   = NULL;
  50. MODULE  TEXT                  cardnumber[10];
  51. MODULE  TEXT                  manuf_buffer[49],
  52.                               product_buffer[49];
  53. MODULE  ABOOL                 foundmanuf,
  54.                               foundproduct;
  55. MODULE  struct List           ManufChooserList;
  56. MODULE  struct ChooserNode*   ManufChooserNodePtr[1 + 1];
  57.  
  58. MODULE void checklibrary(ULONG whichmanuf, ULONG whichproduct);
  59. MODULE void checkinternal(ULONG whichmanuf, ULONG whichproduct);
  60. MODULE void nomanuf(void);
  61. MODULE void noproduct(void);
  62. MODULE void runquery(ULONG whichmanuf, ULONG whichproduct);
  63. MODULE void updatemanuf(void);
  64. MODULE void autoquery(void);
  65.  
  66. // from rp.c
  67. IMPORT WORD              xsize;
  68. IMPORT ULONG             signal;
  69. IMPORT SBYTE             page;
  70. IMPORT ABOOL             fillwindows;
  71. IMPORT TEXT              IOBuffer[LONGESTFIELD + 1],
  72.                          cpuline[VLONGFIELD + 1];
  73. IMPORT struct Window*    MainWindowPtr;
  74. IMPORT struct Library*   BoardsBase;
  75. IMPORT struct Screen*    ScreenPtr;
  76. IMPORT struct Library   *ButtonBase,
  77.                         *CheckBoxBase,
  78.                         *ChooserBase,
  79.                         *IntegerBase,
  80.                         *LabelBase,
  81.                         *LayoutBase,
  82.                         *StringBase,
  83.                         *WindowBase;
  84. IMPORT struct Menu*      MenuPtr;
  85. IMPORT Object*           WinObject[FUNCTIONS + 1];
  86.  
  87. MODULE struct
  88. {   UWORD             manuf;
  89.     UBYTE             product;
  90.     struct ConfigDev* ConfigDevPtr;
  91.     APTR              BoardAddr, Driver;
  92.     ULONG             BoardSize, SerialNumber;
  93.     UWORD             SlotAddr, SlotSize;
  94. } board[16]; // how many boards are simultaneously attachable?
  95.  
  96. AGLOBAL struct Gadget*   manuf_gadgets[GIDS_5 + 1];
  97.  
  98. STRPTR ManufOptions[1 + 1] =
  99. {   "Library, then internal",
  100.     "Internal, then library"
  101. };
  102.  
  103. MODULE struct
  104. {   ULONG  number[3];
  105.     UBYTE  howmany; // how many of the three numbers are registered.
  106.     // They go from left to right.
  107.     STRPTR name;
  108. } manuf[MANUFS + 1] =
  109. {
  110.  1012,    -1,    -1, 1, "Access Associates",
  111.  2003,    -1,    -1, 1, "ACDA",
  112.  2149,    -1,    -1, 1, "ACS",
  113.  2070,    -1,    -1, 1, "Active Circuits Inc.",
  114.  1017,    -1,    -1, 1, "ADA Research",
  115.  2056,  2061,    -1, 2, "Adept Development",
  116.  2057,    -1,    -1, 1, "Advanced Computer Design",
  117.  1046,    -1,    -1, 1, "Advanced Micro Innovations",
  118.  2102,    -1,    -1, 0, "Advanced Storage Systems",
  119.  2016,    -1,    -1, 1, "Akron Systems",
  120.  2083,    -1,    -1, 1, "Alberta Micro Electronic Center",
  121.  2130,    -1,    -1, 1, "Alfa-Laval",
  122.  2063,    -1,    -1, 1, "Alphatech",
  123.  2190,    -1,    -1, 1, "Altatech",
  124.  5010,    -1,    -1, 1, "Ambience Creation Technology",
  125.  2068,    -1,    -1, 1, "Amdev",
  126.  2025,  2094,    -1, 2, "American Liquid Light",
  127.  1053,    -1,    -1, 1, "Ameristar",
  128.  2118,    -1,    -1, 1, "The Amiga Centre",
  129.  2055,    -1,    -1, 1, "Amiga Solutions",
  130.  1019,  2041,    -1, 2, "Amigo Business Computers",
  131.  2176,    -1,    -1, 1, "AmiTrix Development",
  132.  2183,    -1,    -1, 1, "AMOK - Amiga Module & Oberon Klub",
  133.  2116,    -1,    -1, 1, "AMS",
  134.  1009,    -1,    -1, 1, "Anakin Research",
  135.  2007,  2121,    -1, 2, "Analog Electronics",
  136.  1061,    -1,    -1, 1, "Analog Precision or D&L Distributing",
  137.  2088,    -1,    -1, 1, "Applied Engineering",
  138.  2207,    -1,    -1, 1, "Applied Magic Inc.",
  139.  2028,  2054,    -1, 2, "Applied Systems & Peripherals/Xebec",
  140.  2132,    -1,    -1, 1, "Archos",
  141.  1023,    -1,    -1, 1, "ASDG Inc.",
  142.  1005,    -1,    -1, 1, "A-Squared",
  143.  2146,    -1,    -1, 1, "Atlantis",
  144.  2036,    -1,    -1, 1, "Atronic",
  145.  2143,    -1,    -1, 1, "Axellabs",
  146.  2160,    -1,    -1, 1, "bbdp Electronics",
  147.  2008,    -1,    -1, 1, "Bell & Howell",
  148.  2093,    -1,    -1, 1, "Bernd Culenfeld",
  149.  2084,    -1,    -1, 1, "Bestech",
  150.  2105,    -1,    -1, 1, "Beta Unlimited",
  151.  2069,    -1,    -1, 1, "Big Brother Security Systems",
  152.  1043,    -1,    -1, 1, "B. J. Freeman",
  153.  2098,    -1,    -1, 1, "Black Belt Systems",
  154.  1011,    -1,    -1, 1, "Bob Krauth",
  155.  2198,    -1,    -1, 1, "Bob Research Group",
  156.  2066,    -1,    -1, 1, "Bowden, Williams, Full & Assoc.",
  157.  2049,  2092,    -1, 2, "BSC (Elaborate Bytes)/Advanced Development Software",
  158.  2033,    -1,    -1, 1, "BVR",
  159.  2010,    -1,    -1, 1, "Byte Corp",
  160.  2050,    -1,    -1, 1, "C. Ltd",
  161.  2021,    -1,    -1, 0, "California Access (Synergy)",
  162.  2018,    -1,    -1, 1, "Calmos",
  163.  1055,    -1,    -1, 1, "Cardiac Pacemakers Inc.",
  164.  2095,    -1,    -1, 1, "CEGITES",
  165.  2074,    -1,    -1, 1, "The Checkered Ball",
  166.  2024,    -1,    -1, 1, "CH Electronics",
  167.  2114,    -1,    -1, 1, "C. H. Helfrich Electronik",
  168.  2082,    -1,    -1, 1, "Circum Design Inc.",
  169.  2077,    -1,    -1, 1, "Clartscreen Ltd. (UK)",
  170.  2044,    -1,    -1, 1, "Clearpoint Research",
  171.  1054,    -1,    -1, 1, "Cline Refrigeration",
  172. 26470, 49160,    -1, 0, "Combitec",
  173.   515,    -1,    -1, 0, "Combitech/MacroSystems USA",
  174.  2048,    -1,    -1, 1, "Commodore Braunschweig",
  175.   513,   514,    -1, 0, "Commodore Business Machines",
  176.  2134,    -1,    -1, 1, "Commodore Test Engineering Group",
  177.  1018,    -1,    -1, 1, "Computer Service Italia",
  178.  1026,  2052,    -1, 2, "Computer Tuning",
  179.  1006,    -1,    -1, 1, "Comspec Communications",
  180.  2204,    -1,    -1, 1, "Conspector Entertainment",
  181.  2182,    -1,    -1, 1, "CP Computer",
  182.  5011,    -1,    -1, 1, "Creative Development",
  183.  1058,    -1,    -1, 1, "CSA",
  184.  2122,    -1,    -1, 1, "Cumana",
  185.  2186,    -1,    -1, 1, "Cyborg Design Services",
  186.  2197,    -1,    -1, 1, "Cyon",
  187.  2029,    -1,    -1, 1, "Delaware Valley Software",
  188.  2161,    -1,    -1, 1, "Design Computer Systems",
  189.  1041,    -1,    -1, 1, "Design Labs",
  190.  1057,    -1,    -1, 1, "Diener, Wayne",
  191.  2060,    -1,    -1, 1, "Digital Art Systems",
  192.  2129,    -1,    -1, 1, "Digital Micronics",
  193.  2119,    -1,    -1, 1, "Digital Pacific",
  194.  2160,  2169,    -1, 2, "Digital Processing Systems",
  195.  2015,    -1,    -1, 1, "Digitronics",
  196.  2012,    -1,    -1, 1, "DKB Inc. (\"Michigan Software\")",
  197.  2129,    -1,    -1, 0, "DMI",
  198.  2019,    -1,    -1, 1, "Dover Research",
  199.  2064,    -1,    -1, 1, "Edotronik GmbH",
  200.  2206,    -1,    -1, 1, "Elbox Computer",
  201.  2174,    -1,    -1, 1, "Electronic Design",
  202.  2076,    -1,    -1, 1, "Elmtech Research Ltd. (UK)",
  203.  2005,    -1,    -1, 1, "Elthen Electronics",
  204.  2138,    -1,    -1, 1, "Evesham Micro Ltd.",
  205.  2096,    -1,    -1, 1, "EV Industries",
  206.  8290,    -1,    -1, 0, "Expansion Systems",
  207.  1014,  2062,    -1, 2, "Expansion Technologies (Pacific Cypress)",
  208.  2059,    -1,    -1, 1, "Expert Services",
  209.  2137,    -1,    -1, 1, "Faberushi",
  210.  2177,    -1,    -1, 1, "Ferranti",
  211.  2004,    -1,    -1, 1, "Finn R. Jacobsen",
  212.  4648,    -1,    -1, 1, "Flesch Hornemann Computer Elec.",
  213.  2125,    -1,    -1, 1, "For Your Eyes",
  214.  1015,    -1,    -1, 1, "Fuller Computers",
  215.  2201,    -1,    -1, 1, "Fulvio Ieva",
  216.  2187,    -1,    -1, 1, "G2 Systems",
  217.  1016,    -1,    -1, 1, "Galaxy Computers",
  218.  2079,    -1,    -1, 1, "Galysh Enterprises",
  219.  2081,    -1,    -1, 1, "GBS",
  220.  2142,    -1,    -1, 1, "GfxBase Inc.",
  221.  2109,    -1,    -1, 1, "Gigatron OHG",
  222.  2040,    -1,    -1, 1, "GIT",
  223.  2180,    -1,    -1, 1, "GPSoft Pty. Ltd.",
  224.  1051,    -1,    -1, 1, "GRC Electronics",
  225.  2017,  1761,  2193, 1, "Great Valley Peripherals",
  226.  2011,    -1,    -1, 0, "Hacker",
  227.  2158,    -1,    -1, 1, "HAL Software Hardware Handel",
  228.  2560,    -1,    -1, 0, "Harms",
  229.  2166,    -1,    -1, 1, "Hamren, Thomas",
  230.  2192,    -1,    -1, 1, "Hardware Design Udo Neuroth",
  231.  2195,    -1,    -1, 0, "Helfrich",
  232.  2075,    -1,    -1, 1, "Hi Tension Computer Services Ltd. (UK)",
  233.  2113,    -1,    -1, 1, "H. K. Computers",
  234.  2141,    -1,    -1, 1, "Hohabir, Daniel",
  235.  2038,    -1,    -1, 1, "Howitch",
  236.  1007,    -1,    -1, 1, "HT Electronics",
  237.  2121,    -1,    -1, 0, "Hydra Systems",
  238.  2071,    -1,    -1, 1, "ICD Inc.",
  239.  2133,    -1,    -1, 1, "Icom Simulations",
  240.  2104,    -1,    -1, 1, "Impulse Inc.",
  241.  2031,    -1,    -1, 1, "Incognito Software",
  242.  4626,    -1,    -1, 1, "Individual Computers",
  243.  1047,    -1,    -1, 1, "Industrial Support Services",
  244.  2151,    -1,    -1, 1, "Infinity Systems Design Group",
  245.  1025,    -1,    -1, 1, "Ing. Buero Kalawsky",
  246.  2195,    -1,    -1, 1, "Ingenieurbuero Helfrich",
  247.  2112,    -1,    -1, 1, "Interactive Video Systems",
  248.  1027,    -1,    -1, 1, "Interplan Unternehmensberatung",
  249.  2078,    -1,    -1, 1, "Interworks/Network",
  250.  2184,    -1,    -1, 1, "ITEK Neser & Sieber GbR",
  251.  5000,    -1,    -1, 1, "ITH",
  252.  2087,    -1,    -1, 1, "Ivis",
  253.  2112,    -1,    -1, 0, "IVS",
  254.  2032,    -1,    -1, 1, "Jadesign",
  255.  2175,    -1,    -1, 1, "James Cook University of North Queensland",
  256.  2052,    -1,    -1, 0, "Jochheim",
  257.  2180,    -1,    -1, 1, "Juergen Kommos",
  258.  2123,    -1,    -1, 1, "KAPS 2C Conception",
  259.  2009,    -1,    -1, 1, "Kochler, Roland",
  260.  2045,    -1,    -1, 1, "Kodiak",
  261.  2020,    -1,    -1, 1, "Krehbiel, David",
  262.  2043,    -1,    -1, 1, "Kruse, Ralph",
  263.  2073,  4680,    -1, 1, "Kupke Computertechnik GmbH/Golem",
  264.  1052,    -1,    -1, 1, "Lai, David",
  265.  2085,    -1,    -1, 1, "Lasar Fantasy",
  266.  2205,    -1,    -1, 1, "Laserforum",
  267.  2185,    -1,    -1, 1, "Lello, Phillip C.",
  268.  2178,    -1,    -1, 1, "Leviathan Development",
  269.  2065,    -1,    -1, 1, "Logical Design Works",
  270.  1030,    -1,    -1, 0, "Lowell University/Commodore Business Machines",
  271.  1060,    -1,    -1, 1, "Lucas, David",
  272.  2156,  4754,    -1, 2, "MacroSystems",
  273.   256, 18260,    -1, 0, "MacroSystems USA",
  274.  2159,    -1,    -1, 0, "Mainhattan-Data (A-Team)",
  275.  1081,    -1,    -1, 0, "Marc Michael Groth",
  276.  2194,    -1,    -1, 1, "Marpet Developments",
  277.  2157,    -1,    -1, 1, "Masoboshi GmbH",
  278.  2124,    -1,    -1, 1, "Mason, Mike",
  279.  1042,    -1,    -1, 1, "MCS",
  280.  2106,    -1,    -1, 1, "Memory Expansion Systems Ltd.",
  281.  2159,    -1,    -1, 1, "Michael Lamm Computersysteme",
  282.  1010,    -1,    -1, 1, "MicroBotics",
  283.  2135,    -1,    -1, 1, "Microcreations",
  284.  2042,    -1,    -1, 1, "Micro E Ab",
  285.  1003,    -1,    -1, 1, "The Micro-Forge",
  286.  2023,    -1,    -1, 1, "Micron Technology",
  287.  1020,    -1,    -1, 1, "Micro-Solutions Inc.",
  288.  2203,    -1,    -1, 1, "Micro System Devices",
  289.  2002,    -1,    -1, 1, "Mimetics Corp.",
  290.  1013,    -1,    -1, 1, "Mini Comp Systems Ltd.",
  291.  2189,    -1,    -1, 1, "MSPI (Markt & Technik)",
  292.  2131,    -1,    -1, 1, "Multigros A/S",
  293.  2072,    -1,    -1, 1, "Multi-Meg Electronique",
  294.  2196,    -1,    -1, 1, "The Neo Group",
  295.  2067,    -1,    -1, 1, "NES Inc.",
  296.  2111,    -1,    -1, 1, "New Technologies Group",
  297.  2191,    -1,    -1, 1, "NewTek",
  298.  2006,    -1,    -1, 1, "Nine Tiles Computer Systems Ltd.",
  299.  2181,    -1,    -1, 1, "O. Bausch",
  300.  1028,    -1,    -1, 1, "Ohlich, Peter",
  301.  1045,    -1,    -1, 1, "Oklahoma Personal Comp.",
  302.  2145,    -1,    -1, 1, "Omega Datentechnik",
  303.  2165,    -1,    -1, 1, "Overland Engineering",
  304.  2013,   211,    -1, 1, "Pacific Peripherals",
  305.  2030,    -1,    -1, 1, "Palomax",
  306.  2139,    -1,    -1, 1, "Panagolin Laser Software",
  307.  2110,    -1,    -1, 1, "PG Electronics",
  308.  2172,  8512,    -1, 1, "phase 5",
  309.  2046,  2101, 46504, 2, "Phoenix Electronics",
  310.  2108,    -1,    -1, 1, "Platypus Systems",
  311.  2155,    -1,    -1, 1, "Power Computing Ltd.",
  312.  2102,    -1,    -1, 1, "Preferred Technology",
  313.  1030,    -1,    -1, 1, "Productivity Center",
  314.  2026,   756,    -1, 1, "Progressive Peripherals and Software",
  315.  1049,    -1,    -1, 1, "Prolific Inc.",
  316.  2188,    -1,    -1, 1, "Pro System ComputerSysteme",
  317.  2148,    -1,    -1, 1, "Protar Electronics",
  318.  2086,    -1,    -1, 1, "Pulsar",
  319.  1267,    -1,    -1, 1, "RBM Digitaltechnik",
  320.  1008,    -1,    -1, 1, "RDS Software",
  321.  2100,  8448,    -1, 1, "ReadySoft",
  322.  2080,    -1,    -1, 1, "Realtime Games Software Ltd.",
  323. 43437,    -1,    -1, 0, "Reis-Ware",
  324.  2199,    -1,    -1, 1, "Richmond Sound Design Ltd.",
  325.  2144,    -1,    -1, 1, "Roctec Electronics Inc.",
  326.  2103,    -1,    -1, 1, "Rombo Productions",
  327.  1028,  4136,    -1, 0, "Ronin/Imtronics",
  328.  2140,    -1,    -1, 1, "Rudloff, Thomas",
  329.  8704,    -1,    -1, 0, "Sang/CT",
  330.  2128,    -1,    -1, 1, "Scott Advanced Micro Designs",
  331.  2037,    -1,    -1, 1, "Scott Karlin",
  332.  2208,    -1,    -1, 1, "SDL Ltd.",
  333.  2091,    -1,    -1, 1, "Seaview Software",
  334.  2055,    -1,    -1, 0, "Serial Solutions (Checkpoint Technologies)",
  335.  2136,    -1,    -1, 1, "Shoestring Productions",
  336.  1044,    -1,    -1, 1, "Side Effects Inc.",
  337.  2097,    -1,    -1, 1, "Silicon Peace",
  338.  2202,    -1,    -1, 1, "Silicon Studio",
  339.  2058,    -1,    -1, 1, "Sir Netics",
  340.  1050,    -1,    -1, 1, "Softeam Inc.",
  341.  2089,  2120,    -1, 2, "Solid State Design & Development/Solid State Leisure",
  342. 32768,    -1,    -1, 0, "SKI Peripherals",
  343.  2147,    -1,    -1, 1, "Skytec Computers",
  344.  2051,    -1,    -1, 1, "Spartanics",
  345.  2034,  2035,    -1, 2, "Spirit Technology",
  346.  2150,    -1,    -1, 0, "SRE",
  347.  1021,    -1,    -1, 1, "Stacar International",
  348.  2162,    -1,    -1, 1, "The Station",
  349.  2039,    -1,    -1, 1, "Sullivan Brothers Visual Engineers",
  350.  2164,  2170,    -1, 2, "Superformance Computer Engineering GmbH",
  351.  2127,    -1,    -1, 1, "Sunrize Industries",
  352.  2153,    -1,    -1, 1, "Suntec Inc.",
  353.  1056,  1004,    -1, 2, "Supra Corp. (Creative Microsystems)", // 1004 is also unofficially claimed by C. Ltd
  354.  2021,    -1,    -1, 1, "Synergy Peripheral Systems",
  355.  2014,    -1,    -1, 1, "Sysaphus Software",
  356.  1048,    -1,    -1, 1, "Technisoft",
  357.  1001,    -1,    -1, 1, "Tecmar",
  358.  1002,    -1,    -1, 1, "Telesys",
  359.  2168,    -1,    -1, 1, "Toolbox Design",
  360.  2152,    -1,    -1, 1, "Trade It",
  361.  2053,    -1,    -1, 1, "Trans Data Systems",
  362.  2128,    -1,    -1, 0, "Triceratops",
  363.  2154,    -1,    -1, 1, "Tritec Marketing",
  364.  1059,    -1,    -1, 1, "Trionix Inc.",
  365.  2179,    -1,    -1, 1, "United Video Inc.",
  366.  2150,    -1,    -1, 1, "University of Illinois",
  367.  2200,    -1,    -1, 1, "US Cybernetics",
  368.  2171,    -1,    -1, 1, "Utilities Unlimited",
  369.  1022,    -1,    -1, 1, "Video Precisions",
  370.  2167,    -1,    -1, 1, "Village Tronic",
  371.  2193,    -1,    -1, 1, "Viona Developments",
  372.  2090,    -1,    -1, 1, "Vision Quest",
  373.  2126,    -1,    -1, 1, "Volkmar Breitfeld Computersysteme",
  374.  2107,  8215,    -1, 1, "Vortex Computer Systems GmbH",
  375.  5001,    -1,    -1, 1, "VMC",
  376.  2027,    -1,    -1, 1, "Wicat Systems",
  377.  2163,    -1,    -1, 1, "Williams, Bryan",
  378.  2115,    -1,    -1, 1, "Xanadu",
  379.  2022,    -1,    -1, 1, "Xetec",
  380.  2117,    -1,    -1, 1, "X-Pert",
  381.  2099,    -1,    -1, 1, "Yaeger, Steve",
  382.  2047,    -1,    -1, 1, "?", // `no name shown'
  383. };
  384.  
  385. #define PRODUCTS 174
  386. struct
  387. {   ULONG  manufid,
  388.            number[2];
  389.     STRPTR name;
  390.     STRPTR desc;
  391. } product[PRODUCTS + 1] =
  392. {
  393.  2026, 150,  -1, "Zeus 040",                            "68040 accelerator + 32-bit expansion memory + SCSI host adapter", 1056,  12,  -1, "WordSync HD Interface",               "SCSI host adapter",
  394.  2203,  19,  -1, "Warp Engine",                         "68040 accelerator + 32-bit expansion memory",
  395.   256,  19,  -1, "Warp Engine",                         "68040 accelerator + 32-bit expansion memory",
  396.  1010,  68,  -1, "VXL RAM*32",                          "32-bit expansion memory",
  397.  1010,  69,  -1, "VXL 30",                              "68030/6888x accelerator",
  398.  2064,   8,  -1, "VME-Bus Controller",                  "VME-bus interface board",
  399. 18260,   4,  -1, "VLab Y/UV Digitizer",                 "Video digitizer board",
  400.  2117,   2,  -1, "Visiona",                             "Graphics board (I/O area)",
  401.  2117,   1,  -1, "Visiona",                             "Graphics board (memory area)",
  402.  2113, 227,  -1, "Vektor I/O",                          "I/O board",
  403.  2112, 243,  -1, "Vector",                              "68030/68882 accelerator + 32-bit expansion memory",
  404.  2112,  48,  -1, "TrumpCard Classic",                   "SCSI host adapter",
  405.  2112,  52,  -1, "TrumpCard Pro/Grand Slam",            "SCSI host adapter",
  406.  1056,  10,  -1, "SupraRAM",                            "16-bit expansion memory",
  407.  1056,   1,  -1, "SupraDrive 4x4 SCSI",                 "SCSI host adapter",
  408.  1010,   2,  -1, "StarDrive",                           "SCSI host adapter",
  409.  1010,   0,  -1, "StarBoard 2",                         "16-bit expansion memory",
  410. 46504,  33,  -1, "ST506 Autoboot",                      "MFM controller",
  411.  2101,  33,  -1, "ST506 Autoboot",                      "MFM controller",
  412. 49160,  43,  -1, "SRAM Card",                           "Memory board",
  413.  2034,   3,  -1, "SIN500",                              "16-bit expansion memory",
  414.  2012,   9,  -1, "SecureKey",                           "Access control board",
  415. 32768, 128,  -1, "SCSI + Dual Serial",                  "SCSI host adapter/serial board",
  416. 46504,  34,  -1, "SCSI Autoboot",                       "SCSI host adapter",
  417.  2101,  34,  -1, "SCSI Autoboot",                       "SCSI host adapter",
  418.  2073,   2,  -1, "SCSI",                                "SCSI host adapter",
  419. 43437,  17,  -1, "Scan King",                           "Scanner",
  420.   514,  96,  -1, "Romulator",                           "?",
  421. 18260,  16,  -1, "Retina Z3",                           "Graphics board",
  422. 18260,   6,  -1, "Retina",                              "Graphics board",
  423.  2129,   1,  -1, "Resolver",                            "Graphics board",
  424.  2088,  16,  -1, "RAM Works",                           "16-bit expansion memory",
  425.  2052,   1,  -1, "RAM Board",                           "16-bit expansion memory",
  426.  2022,   2,  -1, "RAM Board",                           "16-bit expansion memory",
  427.  1023,   1,   2, "RAM Board",                           "16-bit expansion memory",
  428.  2011,   2,  -1, "Quicknet QN2000",                     "Ethernet LAN board",
  429.  2064,   6,  -1, "PIC Prototyping Board",               "Prototyping board",
  430.  2195,  11,  -1, "Piccolo SD64",                        "Graphics board (I/O area)",
  431.  2195,  10,  -1, "Piccolo SD64",                        "Graphics board (memory area)",
  432.  2195,   6,  -1, "Piccolo",                             "Graphics board (I/O area)",
  433.  2195,   5,  -1, "Piccolo",                             "Graphics board (memory area)",
  434.  2167,  13,  -1, "Picasso ][",                          "Graphics board (segmented area)",
  435.  2167,  12,  -1, "Picasso ][",                          "Graphics board (I/O area)",
  436.  2167,  11,  -1, "Picasso ][",                          "Graphics board (memory area)",
  437.  2112,  16,  -1, "OverDrive",                           "SCSI host adapter",
  438.  4680,   1,  -1, "Omti HD Controller",                  "MFM controller",
  439.  2073,   1,  -1, "Omti HD Controller",                  "MFM controller",
  440.  2092,   5,  -1, "Oktagon",                             "SCSI host adapter",
  441.  2034,   6,  -1, "OctaByte",                            "16-bit expansion memory",
  442.  2102,   1,  -1, "Nexus",                               "SCSI host adapter",
  443.  2128,   1,  -1, "Multiport I/O",                       "I/O board",
  444.  2176,   1,  -1, "Multi-I/O",                           "I/O board",
  445.  2092,  16,  17, "MultiFaceCard",                       "Serial/parallel board",
  446.  2092,  18,  -1, "MultiFaceCard ]I[",                   "Serial/parallel board",
  447.  2112,  64,  -1, "Meta-4",                              "16-bit expansion memory",
  448.  2092,   8,  -1, "Memory Master",                       "16-bit expansion memory",
  449.  2073,   3,  -1, "Memory Expansion",                    "16-bit expansion memory",
  450. 46504, 190,  -1, "Memory Board",                        "16-bit expansion memory",
  451.  2101, 190,  -1, "Memory Board",                        "16-bit expansion memory",
  452.  1010, 129, 193, "MBX 1200",                            "32-bit expansion memory",
  453.  2021,   1,  -1, "Malibu SCSI",                         "SCSI host adapter",
  454.  1058,  17,  -1, "Magnum 040",                          "68040 accelerator + 32-bit expansion memory",
  455.  8704,   1,  -1, "Link-Interface",                      "Transputer link interface",
  456.  1005,   1,  -1, "LIVE! A2000",                         "Video digitizer board",
  457.  2050,   4,  -1, "Kronos 2000",                         "SCSI host adapter",
  458.  1004,   4,  -1, "Kronos 2000",                         "SCSI host adapter",
  459.  2092,  65,  -1, "ISDN-Master",                         "ISDN board",
  460.  2034,   1,  -1, "Insider IN1000",                      "16-bit expansion memory",
  461.  2034,   2,  -1, "Insider IN500",                       "16-bit expansion memory",
  462.  2034,   8,  -1, "Inmate SCSI/FPU/RAM",                 "?",
  463.  2017,  32,  -1, "Impact Vision 24",                    "Graphics board",
  464.  2017,  11,  -1, "Impact Series ][ SCSI (DPRC)",        "SCSI host adapter (or I/O extender)",
  465.  2017,   3,  -1, "Impact Series I SCSI 16K/3",          "SCSI host adapter",
  466.  2017,   2,  -1, "Impact Series I SCSI 16K/2",          "SCSI host adapter",
  467.  2017,   1,  -1, "Impact Series I SCSI 4K",             "SCSI host adapter",
  468.  1761,   8,  -1, "Impact SCSI",                         "SCSI host adapter",
  469.  2017,   8,  13, "Impact A3001 IDE HD",                 "68030/68882 accelerator + IDE controller",
  470.  2064,   1,  -1, "IEEE-488 Controller",                 "IEEE-488 interface board",
  471.  2159,   1,  -1, "IDE",                                 "IDE controller",
  472.  2121,   1,  -1, "Hydra Ethernet",                      "Ethernet LAN board",
  473.  4136,  57,  87, "Hurricane 2800",                      "68030/6888x accelerator + 32-bit expansion memory",
  474.  1028,  57,  87, "Hurricane 2800",                      "68030/6888x accelerator + 32-bit expansion memory",
  475.  2064,   3,  -1, "High-Speed Multiserial Interface",    "Serial board",
  476.   211,  10,  -1, "HD Controller",                       "SCSI host adapter",
  477. 49160,  42,  -1, "HD Controller",                       "SCSI host adapter",
  478.  2034,   4,  -1, "HDA-506",                             "MFM controller",
  479.  1010, 150, 158, "HardFrame/2000",                      "SCSI host adapter",
  480.  2112,   4,  -1, "GrandSlam",                           "SCSI/parallel/serial board",
  481.  1023, 255,  -1, "GPIB or Dual Serial Board",           "IEEE-488 or Twin-X serial card",
  482.  8215,   8,  -1, "GoldenGate 386SX RAM",                "80386SX bridgeboard/Amiga shared RAM",
  483.  8215,   7,  -1, "GoldenGate 386SX",                    "80386SX bridgeboard",
  484.  2150,   1,  -1, "GoldenGate ][",                       "Zorro ][-ISA bridgeboard",
  485.  2017, 255,  -1, "G-Force 040 I/O ('040/2000)",         "Serial/parallel board",
  486.  2142,   0,  -1, "GDA-1 VRAM",                          "Graphics board",
  487.  2142,   1,  -1, "GDA-1",                               "Graphics board",
  488.  2104,   0,  -1, "Firecracker",                         "Frame buffer",
  489.  2092,  32,  -1, "Frame Buffer",                        "Graphics board",
  490.  2022,   1,  -1, "FastTrak HD",                         "SCSI host adapter",
  491.  8512,  10,  -1, "FastLane Z3",                         "SCSI host adapter + 32-bit expansion memory",
  492.  2022,   3,  -1, "FastCard + HD Controller",            "?",
  493.  2067,   0,  -1, "Expansion RAM",                       "16-bit expansion memory",
  494.   756,   2,  -1, "EXP8000",                             "16-bit expansion memory",
  495.  1053,   1,  -1, "Ethernet",                            "Ethernet LAN board",
  496.  2193,   1,  -1, "EGS Spectrum",                        "Graphics board (I/O area)",
  497.  2193,   2,  -1, "EGS Spectrum",                        "Graphics board (memory area)",
  498.  1004,  14,  -1, "Escort",                              "SCSI host adapter",
  499.  1023, 254,  -1, "EB-920 LanRover",                     "Ethernet LAN board",
  500.  1009,   1,  -1, "Easyl",                               "Graphics tablet",
  501.  2064,   9,  -1, "DSP96000 Real Time Data Acquisition", "Data acquisition board",
  502.  2088,  16,  -1, "DL2000",                              "Modem",
  503.  2055,   0,  -1, "Dual Port Serial",                    "Serial board",
  504.  2129,   6,  -1, "Digital Broadcaster 32",              "Image processing board",
  505.  8290,   1,  -1, "DataFlyer 500 SCSI",                  "SCSI host adapter",
  506.  8512,  34,  -1, "CyberVision 64",                      "Graphics board",
  507.  8512,  11,  -1, "CyberStorm",                          "68040 accelerator + 32-bit expansion memory",
  508.  2176,   2,  -1, "CD-RAM",                              "16-bit expansion memory",
  509.  2010,   0,  -1, "Byte Box A500",                       "?",
  510.  8512,  24,  -1, "Blizzard A2060",                      "68060 accelerator + 32-bit expansion memory",
  511.  8512,  17,  -1, "Blizzard 1230",                       "68030/68882 accelerator + 32-bit expansion memory",
  512.  8512,   2,  -1, "Blizzard Turbo",                      "Accelerator board (I/O area)",
  513.  8512,   1,  -1, "Blizzard Turbo",                      "Accelerator board (memory area)",
  514.  2034,   5,  -1, "AX-S IBM Hardware I/O Board",         "I/O board",
  515.  1006,   1,  -1, "AX2000",                              "16-bit expansion memory",
  516.  8448,   1,  -1, "A-Max ][+/A-Max IV",                  "Macintosh emulation board",
  517.  2049,   3,  -1, "ALF 3 SCSI",                          "SCSI host adapter",
  518.  2049,   2,  -1, "ALF 2 SCSI",                          "SCSI host adapter",
  519.  2049,   1,  -1, "ALF 2",                               "MFM controller",
  520.  2071,   1,  -1, "Advantage 2000/AdSCSI",               "SCSI host adapter",
  521.  2167, 201,  -1, "Adriadne",                            "Ethernet LAN + I/O board",
  522.  2071,   4,  -1, "AdRAM 2080",                          "16-bit expansion memory",
  523.  2071,   3,  -1, "AdIDE",                               "IDE controller",
  524.   514,  84,  -1, "A4091",                               "SCSI host adapter",
  525.  1053,  10,  -1, "A4066",                               "Ethernet LAN board",
  526.   514,  97,  -1, "A3000 test fixture",                  "?",
  527.   514,  81,  -1, "A2630",                               "68030/68882 accelerator + 32-bit expansion memory",
  528.   514,  80,  -1, "A2620",                               "68020/68851/6888x accelerator + 32-bit expansion memory",
  529.  1030,   0,  -1, "A2410",                               "Graphics board",
  530.   513, 103,  -1, "A2386SX",                             "80386SX bridgeboard",
  531.   513,   2,  -1, "A2286",                               "80286 bridgeboard",
  532.   514,  70,  -1, "A2232",                               "Serial board",
  533.   514,  69,  -1, "A2232 prototype",                     "Serial board",
  534.   514,   3,  -1, "A2091",                               "SCSI host adapter",
  535.   514,   4,  -1, "A2090B",                              "Autoboot card",
  536.   515,   3,  -1, "A2090/A2090A",                        "MFM controller + SCSI host adapter with new driver",
  537.   514,   1,  -1, "A2090/A2090A",                        "MFM controller + SCSI host adapter",
  538.   513,   1,  -1, "A2088/A2286",                         "8088/80286 bridgeboard",
  539.   514, 112,  -1, "A2065",                               "Ethernet LAN board",
  540.  1053,   9,  -1, "A2060 Arcnet",                        "Arcnet LAN board",
  541.   514,   9,  -1, "A2060",                               "Arcnet LAN board",
  542.   514,  10,  -1, "A205x/A2091/A590",                    "16-bit expansion memory",
  543.  2560, 208,  -1, "A2000 Turboboard 3500 Professional",  "68030/68882 accelerator + 32-bit expansion memory",
  544.  1056,   3,  -1, "A2000 DMA HD Interface",              "SCSI host adapter",
  545.  2017,  22,  -1, "A2000 060 Combo",                     "68060 accelerator + 32-bit expansion memory",
  546.  1004,  12,  -1, "A1000/A2000 SCSI",                    "SCSI host adapter",
  547.  2050,  12,  -1, "A1000 SCSI",                          "SCSI host adapter",
  548.  1056,   2,  -1, "A1000 RAM Expansion",                 "16-bit expansion memory",
  549.   514,   2,  -1, "A590",                                "SCSI host adapter/XT controller",
  550.   514,  32,  -1, "A560",                                "16-bit expansion memory",
  551.  1056,  13,  -1, "A500 ByteSync HD Interface",          "SCSI host adapter",
  552.  1056,   8,  -1, "A500 Autoboot HD Interface",          "SCSI host adapter",
  553.  2073,   5,  -1, "68030 (asynchronous)",                "68030/6888x accelerator",
  554.  2073,   4,  -1, "68030 (synchronous)",                 "68030/6888x accelerator",
  555.  2064,   2,  -1, "8032 Development Adapter",            "CBM-8032 board?",
  556.  1056,  16,  -1, "2400zi+",                             "Modem",
  557.  1056,  11,  -1, "2400zi",                              "Modem",
  558.  1056,   9,  -1, "500/2000 RX",                         "16-bit expansion memory",
  559.  1056,   5,  -1, "500 HD/RAM",                          "SCSI host adapter + 16-bit expansion memory",
  560.  2026, 105,  -1, "040/A2000 Board",                     "68040 accelerator + 32-bit expansion memory",
  561.  2064,   5,  -1, "32-Bit Parallel I/O Interface",       "Parallel board",
  562.  2064,   4,  -1, "24-Bit Real Time Video Digitizer",    "Video digitizer board",
  563.  2064,   7,  -1, "16-Channel ADC Interface",            "Analog to digital board",
  564.  1058,  21,  -1, "12 Gauge",                            "68030/68882 accelerator + 32-bit expansion memory",
  565.  1010,   4,  -1, "8-UP! (Z)",                           "16-bit expansion memory",
  566.  1010,   3,  -1, "8-UP! (A)",                           "16-bit expansion memory"
  567. };
  568.  
  569. MODULE void runquery(ULONG whichmanuf, ULONG whichproduct)
  570. {   /* This function takes a manufacturer and product ID and attempts
  571.     to update the text gadgets with a relevant text description.
  572.  
  573.     If ~0 (-1) is passed for either the manufacturer or product ID,
  574.     the function returns immediately without doing anything. */
  575.  
  576.     selectedmanuf   =
  577.     selectedproduct = (UWORD) ~0;
  578.  
  579.     if (whichmanuf == (ULONG) ~0 || whichproduct == (ULONG) ~0)
  580.     {   return;
  581.     }
  582.  
  583.     SetGadgetAttrs
  584.     (   manuf_gadgets[GID_5_CB1], MainWindowPtr, NULL,
  585.         GA_Selected, FALSE,
  586.         TAG_END
  587.     );
  588.     SetGadgetAttrs
  589.     (   manuf_gadgets[GID_5_CB2], MainWindowPtr, NULL,
  590.         GA_Selected, FALSE,
  591.         TAG_END
  592.     );
  593.  
  594.     if (precedence == 1)
  595.     {   checkinternal(whichmanuf, whichproduct);
  596.         if (foundmanuf) // found int. manuf, maybe int. product
  597.         {   if (!foundproduct) // found int. manuf but not int. product
  598.             {   noproduct();
  599.         }   }
  600.         else
  601.         {   checklibrary(whichmanuf, whichproduct);
  602.             if (!foundmanuf)
  603.             {   nomanuf();
  604.                 noproduct();
  605.     }   }   }
  606.     else
  607.     {   assert(precedence == 0);
  608.         checklibrary(whichmanuf, whichproduct);
  609.         if (!foundmanuf) // can't find lib. manuf/product
  610.         {   checkinternal(whichmanuf, whichproduct);
  611.             if (foundmanuf) // found int. manuf, maybe int. product
  612.             {   if (!foundproduct) // found int. manuf but not int. product
  613.                 {   noproduct();
  614.             }   }
  615.             else
  616.             {   nomanuf();
  617.                 noproduct();
  618. }   }   }   }
  619.  
  620. MODULE void updatemanuf(void)
  621. {   TEXT  output[13 + 1];
  622.     ULONG i;
  623.  
  624.     if (whichboard == 0)
  625.     {   SetGadgetAttrs
  626.         (   manuf_gadgets[GID_5_BU1], MainWindowPtr, NULL,
  627.             GA_Disabled, TRUE,
  628.             TAG_END
  629.         );
  630.     } else
  631.     {   SetGadgetAttrs
  632.         (   manuf_gadgets[GID_5_BU1], MainWindowPtr, NULL,
  633.             GA_Disabled, FALSE,
  634.             TAG_END
  635.         );
  636.     }
  637.  
  638.     if (whichboard < boards)
  639.     {   SetGadgetAttrs // next card
  640.         (   manuf_gadgets[GID_5_BU2], MainWindowPtr, NULL,
  641.             GA_Disabled, FALSE,
  642.             TAG_END
  643.         );
  644.         SetGadgetAttrs // manuf ID
  645.         (   manuf_gadgets[GID_5_IN1], MainWindowPtr, NULL,
  646.             GA_Disabled, TRUE,
  647.             INTEGER_Number, board[whichboard].manuf,
  648.             TAG_END
  649.         );
  650.         SetGadgetAttrs // product ID
  651.         (   manuf_gadgets[GID_5_IN2], MainWindowPtr, NULL,
  652.             GA_Disabled, TRUE,
  653.             INTEGER_Number, board[whichboard].product,
  654.             TAG_END
  655.         );
  656.         stcl_d(cardnumber, whichboard + 1);
  657.         SetGadgetAttrs // card
  658.         (   manuf_gadgets[GID_5_ST1], MainWindowPtr, NULL,
  659.             STRINGA_TextVal, cardnumber,
  660.             TAG_END
  661.         );
  662.  
  663.         output[0] = '$';
  664.  
  665.         stcl_h(&output[1], (ULONG) board[whichboard].ConfigDevPtr);
  666.         SetGadgetAttrs
  667.         (   manuf_gadgets[GID_5_ST5], MainWindowPtr, NULL,
  668.             STRINGA_TextVal, output,
  669.         TAG_END);
  670.  
  671.         stcl_h(&output[1], (ULONG) board[whichboard].Driver);
  672.         SetGadgetAttrs
  673.         (   manuf_gadgets[GID_5_ST6], MainWindowPtr, NULL,
  674.             STRINGA_TextVal, output,
  675.         TAG_END);
  676.  
  677.         stcl_h(&output[1], board[whichboard].SerialNumber);
  678.         SetGadgetAttrs
  679.         (   manuf_gadgets[GID_5_ST7], MainWindowPtr, NULL,
  680.             STRINGA_TextVal, output,
  681.         TAG_END);
  682.  
  683.         stcl_h(&output[1], (ULONG) board[whichboard].BoardAddr);
  684.         SetGadgetAttrs
  685.         (   manuf_gadgets[GID_5_ST8], MainWindowPtr, NULL,
  686.             STRINGA_TextVal, output,
  687.         TAG_END);
  688.  
  689.         stcl_h(&output[1], board[whichboard].BoardSize);
  690.         SetGadgetAttrs
  691.         (   manuf_gadgets[GID_5_ST9], MainWindowPtr, NULL,
  692.             STRINGA_TextVal, output,
  693.         TAG_END);
  694.  
  695.         stcl_h(&output[1], (ULONG) board[whichboard].SlotAddr);
  696.         SetGadgetAttrs
  697.         (   manuf_gadgets[GID_5_ST10], MainWindowPtr, NULL,
  698.             STRINGA_TextVal, output,
  699.         TAG_END);
  700.  
  701.         stcl_h(&output[1], (ULONG) board[whichboard].SlotSize);
  702.         SetGadgetAttrs
  703.         (   manuf_gadgets[GID_5_ST11], MainWindowPtr, NULL,
  704.             STRINGA_TextVal, output,
  705.         TAG_END);
  706.     } else
  707.     {   SetGadgetAttrs // next card
  708.         (   manuf_gadgets[GID_5_BU2], MainWindowPtr, NULL,
  709.             GA_Disabled, TRUE,
  710.             TAG_END
  711.         );
  712.         SetGadgetAttrs // manuf ID
  713.         (   manuf_gadgets[GID_5_IN1], MainWindowPtr, NULL,
  714.             GA_Disabled, FALSE,
  715.             INTEGER_Number, querymanuf,
  716.             TAG_END
  717.         );
  718.         SetGadgetAttrs // product ID
  719.         (   manuf_gadgets[GID_5_IN2], MainWindowPtr, NULL,
  720.             GA_Disabled, FALSE,
  721.             INTEGER_Number, queryproduct,
  722.             TAG_END
  723.         );
  724.         SetGadgetAttrs // card
  725.         (   manuf_gadgets[GID_5_ST1], MainWindowPtr, NULL,
  726.             STRINGA_TextVal, "Queryable",
  727.             TAG_END
  728.         );
  729.  
  730.         for (i = 0; i <= 6; i++)
  731.         {   SetGadgetAttrs
  732.             (   manuf_gadgets[GID_5_ST5 + i], MainWindowPtr, NULL,
  733.                 STRINGA_TextVal, "-",
  734.             TAG_END);
  735.     }   }
  736.     runquery(board[whichboard].manuf, board[whichboard].product);
  737. }
  738.  
  739. AGLOBAL void manuf1(void)
  740. {   struct ConfigDev* ThisConfigDev;
  741.     ULONG             i, bufferoffset, stringoffset;
  742.     struct Hook       Hook5Struct;
  743.     TEXT              cpustring[MEDFIELD + 1], fpustring[MEDFIELD + 1];
  744.     
  745.     NewList(&ManufChooserList);
  746.     for (i = 0; i <= 1; i++)
  747.     {   if (!(ManufChooserNodePtr[i] = (struct ChooserNode *) AllocChooserNode(CNA_Text, ManufOptions[i], TAG_DONE)))
  748.         {   rq("Can't allocate chooser node!");
  749.         }
  750.         AddTail(&ManufChooserList, (struct Node *) ManufChooserNodePtr[i]);
  751.     } // automatically freed by ReAction at DisposeObject() time
  752.  
  753.     if (ExpansionBase = (struct ExpansionBase *) OpenLibrary(EXPANSIONNAME, 0))
  754.     {   /* Use FindConfigDev() to get info on the first expansion board on
  755.         the list maintained by Exec. */
  756.  
  757.         if (ThisConfigDev = FindConfigDev(NULL, -1, -1))
  758.         {   board[0].manuf        = ThisConfigDev->cd_Rom.er_Manufacturer;
  759.             board[0].product      = ThisConfigDev->cd_Rom.er_Product;
  760.             board[0].ConfigDevPtr = ThisConfigDev;                         // struct ConfigDev*
  761.             board[0].BoardAddr    = ThisConfigDev->cd_BoardAddr;           // APTR
  762.             board[0].BoardSize    = ThisConfigDev->cd_BoardSize;           // ULONG
  763.             board[0].SlotAddr     = ThisConfigDev->cd_SlotAddr;            // UWORD
  764.             board[0].SlotSize     = ThisConfigDev->cd_SlotSize;            // UWORD
  765.             board[0].Driver       = ThisConfigDev->cd_Driver;              // APTR
  766.             board[0].SerialNumber = ThisConfigDev->cd_Rom.er_SerialNumber; // ULONG
  767.             boards = 1;
  768.  
  769.             /* OK, there is at least one board, so loop and get the
  770.             entire list. */
  771.             while (ThisConfigDev = FindConfigDev(ThisConfigDev, -1, -1))
  772.             {   board[boards].manuf        = ThisConfigDev->cd_Rom.er_Manufacturer;
  773.                 board[boards].product      = ThisConfigDev->cd_Rom.er_Product;
  774.                 board[boards].ConfigDevPtr = ThisConfigDev;                         // struct ConfigDev*
  775.                 board[boards].BoardAddr    = ThisConfigDev->cd_BoardAddr;           // APTR
  776.                 board[boards].BoardSize    = ThisConfigDev->cd_BoardSize;           // ULONG
  777.                 board[boards].SlotAddr     = ThisConfigDev->cd_SlotAddr;            // UWORD
  778.                 board[boards].SlotSize     = ThisConfigDev->cd_SlotSize;            // UWORD
  779.                 board[boards].Driver       = ThisConfigDev->cd_Driver;              // APTR
  780.                 board[boards].SerialNumber = ThisConfigDev->cd_Rom.er_SerialNumber; // ULONG
  781.                 boards++;
  782.         }   }
  783.         else boards = 0;
  784.         CloseLibrary((struct Library *) ExpansionBase);
  785.     }
  786.  
  787.     if (cpuline[0] == '?')
  788.     {   strcpy(cpustring, "?");
  789.         strcpy(fpustring, "?");
  790.     } else
  791.     {   stringoffset = 0;
  792.         bufferoffset = 8; // to bypass "System: "
  793.         while (cpuline[bufferoffset] != ' ')
  794.         {   cpustring[stringoffset] = cpuline[bufferoffset];
  795.             stringoffset++;
  796.             bufferoffset++;
  797.         }
  798.         cpustring[stringoffset] = 0;
  799.  
  800.         stringoffset = 0;
  801.         bufferoffset++;
  802.         while (cpuline[bufferoffset] != ' ')
  803.         {   fpustring[stringoffset] = cpuline[bufferoffset];
  804.             stringoffset++;
  805.             bufferoffset++;
  806.         }
  807.         fpustring[stringoffset] = 0;
  808.  
  809.         if (fpustring[0] == '(')
  810.         {   strcpy(fpustring, "None");
  811.     }   }
  812.  
  813.     InitHook(&Hook5Struct, Hook5Func, NULL);
  814.  
  815.     /* Create the window object. */
  816.     lockscreen();
  817.  
  818.     if (!(WinObject[5] =          NewObject(WINDOW_GetClass(), NULL,
  819.     // window
  820.     WA_PubScreen,                 ScreenPtr,
  821.     WA_ScreenTitle,               "Report+",
  822.     WA_Title,                     "Report+: Manufacturer IDs",
  823.     WA_Activate,                  TRUE,
  824.     WA_DepthGadget,               TRUE,
  825.     WA_DragBar,                   TRUE,
  826.     WA_CloseGadget,               TRUE,
  827.     WA_SizeGadget,                TRUE,
  828.     WA_IDCMP,                     IDCMP_RAWKEY,
  829.     WINDOW_IDCMPHook,             &Hook5Struct,
  830.     WINDOW_IDCMPHookBits,         IDCMP_RAWKEY,
  831.     WINDOW_MenuStrip,             MenuPtr,
  832.     WINDOW_Position,              WPOS_CENTERSCREEN,
  833.     WINDOW_ParentGroup,           manuf_gadgets[GID_5_LY1] =
  834.     NewObject
  835.     (   LAYOUT_GetClass(),        NULL,
  836.         // root-layout
  837.         LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  838.         LAYOUT_SpaceOuter,        TRUE,
  839.         LAYOUT_DeferLayout,       TRUE,
  840.         LAYOUT_ShrinkWrap,        TRUE,
  841.         LAYOUT_AddChild,          NewObject
  842.         (   LAYOUT_GetClass(),    NULL,
  843.             // layout
  844.             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  845.             LAYOUT_SpaceOuter,    TRUE,
  846.             LAYOUT_VertAlignment, LALIGN_CENTER,
  847.             LAYOUT_HorizAlignment,LALIGN_CENTER,
  848.             LAYOUT_BevelStyle,    BVS_NONE,
  849.             LAYOUT_AddChild,
  850.             NewObject
  851.             (   LAYOUT_GetClass(),    NULL,
  852.                 LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  853.                 LAYOUT_VertAlignment, LALIGN_CENTER,
  854.                 LAYOUT_HorizAlignment,LALIGN_LEFT,
  855.                 LAYOUT_BevelStyle,    BVS_NONE,
  856.                 LAYOUT_AddChild,
  857.                 NewObject
  858.                 (   LAYOUT_GetClass(),        NULL,
  859.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  860.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  861.                     LAYOUT_BevelStyle,        BVS_NONE,
  862.                     LAYOUT_AddImage,          NewObject
  863.                     (   LABEL_GetClass(),     NULL,
  864.                         LABEL_Text,           "Card:",
  865.                         LABEL_Justification,  LJ_RIGHT,
  866.                         TAG_END
  867.                     ),
  868.                     TAG_END
  869.                 ),
  870.                 LAYOUT_AddChild,
  871.                 NewObject
  872.                 (   LAYOUT_GetClass(),        NULL,
  873.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  874.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  875.                     LAYOUT_BevelStyle,        BVS_NONE,
  876.                     LAYOUT_AddImage,          NewObject
  877.                     (   LABEL_GetClass(),     NULL,
  878.                         LABEL_Text,           "Manufacturer:",
  879.                         LABEL_Justification,  LJ_RIGHT,
  880.                         TAG_END
  881.                     ),
  882.                     TAG_END
  883.                 ),
  884.                 LAYOUT_AddChild,
  885.                 NewObject
  886.                 (   LAYOUT_GetClass(),        NULL,
  887.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  888.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  889.                     LAYOUT_BevelStyle,        BVS_NONE,
  890.                     LAYOUT_AddImage,          NewObject
  891.                     (   LABEL_GetClass(),     NULL,
  892.                         LABEL_Text,           "Product:",
  893.                         LABEL_Justification,  LJ_RIGHT,
  894.                         TAG_END
  895.                     ),
  896.                     TAG_END
  897.                 ),
  898.                 LAYOUT_AddChild,
  899.                 NewObject
  900.                 (   LAYOUT_GetClass(),        NULL,
  901.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  902.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  903.                     LAYOUT_BevelStyle,        BVS_NONE,
  904.                     LAYOUT_AddImage,          NewObject
  905.                     (   LABEL_GetClass(),     NULL,
  906.                         LABEL_Text,           "Description:",
  907.                         LABEL_Justification,  LJ_RIGHT,
  908.                         TAG_END
  909.                     ),
  910.                     TAG_END
  911.                 ),
  912.                 LAYOUT_AddChild,
  913.                 NewObject
  914.                 (   LAYOUT_GetClass(),        NULL,
  915.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  916.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  917.                     LAYOUT_BevelStyle,        BVS_NONE,
  918.                     LAYOUT_AddImage,          NewObject
  919.                     (   LABEL_GetClass(),     NULL,
  920.                         LABEL_Text,           "Serial Number:",
  921.                         LABEL_Justification,  LJ_RIGHT,
  922.                         TAG_END
  923.                     ),
  924.                     TAG_END
  925.                 ),
  926.                 TAG_END
  927.             ),
  928.             CHILD_WeightedWidth,          0,
  929.             LAYOUT_AddChild,
  930.             NewObject
  931.             (   LAYOUT_GetClass(),        NULL,
  932.                 // layout
  933.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  934.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  935.                 LAYOUT_HorizAlignment,    LALIGN_LEFT,
  936.                 LAYOUT_BevelStyle,        BVS_NONE,
  937.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST1] =
  938.                 NewObject
  939.                 (   STRING_GetClass(),    NULL,
  940.                     GA_ReadOnly,          TRUE,
  941.                     GA_ID,                GID_5_ST1,
  942.                     STRINGA_TextVal,      "-",
  943.                     STRINGA_MinVisible,   9,
  944.                     TAG_END
  945.                 ),
  946.                 CHILD_MinWidth,           256,
  947.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST2] =
  948.                 NewObject
  949.                 (   STRING_GetClass(),    NULL,
  950.                     GA_ReadOnly,          TRUE,
  951.                     GA_ID,                GID_5_ST2,
  952.                     STRINGA_TextVal,      "-",
  953.                     TAG_END
  954.                 ),
  955.                 CHILD_MinWidth,           256,
  956.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST3] =
  957.                 NewObject
  958.                 (   STRING_GetClass(),    NULL,
  959.                     GA_ReadOnly,          TRUE,
  960.                     GA_ID,                GID_5_ST3,
  961.                     STRINGA_TextVal,      "-",
  962.                     TAG_END
  963.                 ),
  964.                 CHILD_MinWidth,           256,
  965.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST4] =
  966.                 NewObject
  967.                 (   STRING_GetClass(),    NULL,
  968.                     GA_ReadOnly,          TRUE,
  969.                     GA_ID,                GID_5_ST4,
  970.                     STRINGA_TextVal,      "-",
  971.                     TAG_END
  972.                 ),
  973.                 CHILD_MinWidth,           256,
  974.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST7] =
  975.                 NewObject
  976.                 (   STRING_GetClass(),    NULL,
  977.                     GA_ReadOnly,          TRUE,
  978.                     GA_ID,                GID_5_ST7,
  979.                     STRINGA_TextVal,      "-",
  980.                     STRINGA_MinVisible,   9,
  981.                     TAG_END
  982.                 ),
  983.                 CHILD_MinWidth,           256,
  984.                 TAG_END
  985.             ),
  986.             CHILD_WeightedHeight,     0,
  987.             LAYOUT_AddChild,
  988.             NewObject
  989.             (   LAYOUT_GetClass(),    NULL,
  990.                 // layout
  991.                 LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  992.                 LAYOUT_VertAlignment, LALIGN_CENTER,
  993.                 LAYOUT_HorizAlignment,LALIGN_LEFT,
  994.                 LAYOUT_BevelStyle,    BVS_NONE,
  995.                 LAYOUT_AddImage,          NewObject
  996.                 (   LABEL_GetClass(),     NULL,
  997.                     LABEL_Text,           "",
  998.                     TAG_END
  999.                 ),
  1000.                 LAYOUT_AddChild,
  1001.                 NewObject
  1002.                 (   LAYOUT_GetClass(),        NULL,
  1003.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1004.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1005.                     LAYOUT_VertAlignment,     LALIGN_BOTTOM,
  1006.                     LAYOUT_BevelStyle,        BVS_NONE,
  1007.                     LAYOUT_AddChild,
  1008.                     NewObject
  1009.                     (   LAYOUT_GetClass(),        NULL,
  1010.                         LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1011.                         LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1012.                         LAYOUT_VertAlignment,     LALIGN_CENTER,
  1013.                         LAYOUT_BevelStyle,        BVS_NONE,
  1014.                         LAYOUT_AddImage,          NewObject
  1015.                         (   LABEL_GetClass(),     NULL,
  1016.                             // label
  1017.                             LABEL_Text,           "_ID:",
  1018.                             LABEL_Justification,  LJ_RIGHT,
  1019.                             TAG_END
  1020.                         ),
  1021.                         TAG_END
  1022.                     ),
  1023.                     LAYOUT_AddChild,          manuf_gadgets[GID_5_IN1] =
  1024.                     NewObject
  1025.                     (   INTEGER_GetClass(),   NULL,
  1026.                         GA_ID,                GID_5_IN1,
  1027.                         GA_RelVerify,         TRUE,
  1028.                         GA_TabCycle,          TRUE,
  1029.                         INTEGER_Number,       querymanuf,
  1030.                         INTEGER_Minimum,      0,
  1031.                         INTEGER_Maximum,      65535,
  1032.                         INTEGER_MinVisible,   5,
  1033.                         TAG_END
  1034.                     ),                                      
  1035.                     TAG_END
  1036.                 ),                                                
  1037.                 CHILD_WeightedHeight,         0,
  1038.                 LAYOUT_AddChild,
  1039.                 NewObject
  1040.                 (   LAYOUT_GetClass(),        NULL,
  1041.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1042.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1043.                     LAYOUT_VertAlignment,     LALIGN_BOTTOM,
  1044.                     LAYOUT_BevelStyle,        BVS_NONE,
  1045.                     LAYOUT_AddChild,
  1046.                     NewObject
  1047.                     (   LAYOUT_GetClass(),        NULL,
  1048.                         LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1049.                         LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1050.                         LAYOUT_VertAlignment,     LALIGN_CENTER,
  1051.                         LAYOUT_BevelStyle,        BVS_NONE,
  1052.                         LAYOUT_AddImage,          NewObject
  1053.                         (   LABEL_GetClass(),     NULL,
  1054.                             // label
  1055.                             LABEL_Text,           "I_D:",
  1056.                             LABEL_Justification,  LJ_RIGHT,
  1057.                             TAG_END
  1058.                         ),
  1059.                         TAG_END
  1060.                     ),
  1061.                     LAYOUT_AddChild,          manuf_gadgets[GID_5_IN2] =
  1062.                     NewObject
  1063.                     (   INTEGER_GetClass(),   NULL,
  1064.                         GA_ID,                GID_5_IN2,
  1065.                         GA_RelVerify,         TRUE,
  1066.                         GA_TabCycle,          TRUE,
  1067.                         INTEGER_Number,       queryproduct,
  1068.                         INTEGER_Minimum,      0,
  1069.                         INTEGER_Maximum,      255,
  1070.                         INTEGER_MinVisible,   5,
  1071.                         TAG_END
  1072.                     ),
  1073.                     TAG_END
  1074.                 ),
  1075.                 CHILD_WeightedHeight,     0,
  1076.                 LAYOUT_AddImage,          NewObject
  1077.                 (   LABEL_GetClass(),     NULL,
  1078.                     LABEL_Text,           "",
  1079.                     TAG_END
  1080.                 ),
  1081.                 LAYOUT_AddImage,          NewObject
  1082.                 (   LABEL_GetClass(),     NULL,
  1083.                     LABEL_Text,           "",
  1084.                     TAG_END
  1085.                 ),
  1086.                 TAG_END
  1087.             ),
  1088.             CHILD_WeightedWidth,          0,
  1089.             TAG_END
  1090.         ),
  1091.         CHILD_WeightedHeight,             0,
  1092.         LAYOUT_AddChild,
  1093.         NewObject
  1094.         (   LAYOUT_GetClass(),            NULL,
  1095.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  1096.             LAYOUT_SpaceOuter,            TRUE,
  1097.             LAYOUT_HorizAlignment,        LALIGN_RIGHT,
  1098.             LAYOUT_VertAlignment,         LALIGN_CENTER,
  1099.             LAYOUT_BevelStyle,            BVS_FIELD,
  1100.             LAYOUT_AddChild,
  1101.             NewObject
  1102.             (   LAYOUT_GetClass(),        NULL,
  1103.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1104.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1105.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1106.                 LAYOUT_BevelStyle,        BVS_NONE,
  1107.                 LAYOUT_AddChild,
  1108.                 NewObject
  1109.                 (   LAYOUT_GetClass(),        NULL,
  1110.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1111.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1112.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1113.                     LAYOUT_BevelStyle,        BVS_NONE,
  1114.                     LAYOUT_AddImage,          NewObject
  1115.                     (   LABEL_GetClass(),     NULL,
  1116.                         LABEL_Text,           "ConfigDev:",
  1117.                         LABEL_Justification,  LJ_RIGHT,
  1118.                     TAG_END),
  1119.                 TAG_END),
  1120.                 LAYOUT_AddChild,
  1121.                 NewObject
  1122.                 (   LAYOUT_GetClass(),        NULL,
  1123.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1124.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1125.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1126.                     LAYOUT_BevelStyle,        BVS_NONE,
  1127.                     LAYOUT_AddImage,          NewObject
  1128.                     (   LABEL_GetClass(),     NULL,
  1129.                         LABEL_Text,           "Board Address:",
  1130.                         LABEL_Justification,  LJ_RIGHT,
  1131.                     TAG_END),
  1132.                 TAG_END),
  1133.                 LAYOUT_AddChild,
  1134.                 NewObject
  1135.                 (   LAYOUT_GetClass(),        NULL,
  1136.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1137.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1138.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1139.                     LAYOUT_BevelStyle,        BVS_NONE,
  1140.                     LAYOUT_AddImage,          NewObject
  1141.                     (   LABEL_GetClass(),     NULL,
  1142.                         LABEL_Text,           "Board Size:",
  1143.                         LABEL_Justification,  LJ_RIGHT,
  1144.                     TAG_END),
  1145.                 TAG_END),
  1146.             TAG_END),
  1147.             LAYOUT_AddChild,
  1148.             NewObject
  1149.             (   LAYOUT_GetClass(),        NULL,
  1150.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1151.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1152.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1153.                 LAYOUT_BevelStyle,        BVS_NONE,
  1154.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST5] =
  1155.                 NewObject
  1156.                 (   STRING_GetClass(),    NULL,
  1157.                     GA_ReadOnly,          TRUE,
  1158.                     GA_ID,                GID_5_ST5,
  1159.                     STRINGA_TextVal,      "-",
  1160.                     STRINGA_MinVisible,   9,
  1161.                 TAG_END),
  1162.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST8] =
  1163.                 NewObject
  1164.                 (   STRING_GetClass(),    NULL,
  1165.                     GA_ReadOnly,          TRUE,
  1166.                     GA_ID,                GID_5_ST8,
  1167.                     STRINGA_TextVal,      "-",
  1168.                     STRINGA_MinVisible,   9,
  1169.                 TAG_END),
  1170.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST9] =
  1171.                 NewObject
  1172.                 (   STRING_GetClass(),    NULL,
  1173.                     GA_ReadOnly,          TRUE,
  1174.                     GA_ID,                GID_5_ST9,
  1175.                     STRINGA_TextVal,      "-",
  1176.                     STRINGA_MinVisible,   9,
  1177.                 TAG_END),
  1178.             TAG_END),
  1179.             LAYOUT_AddChild,
  1180.             NewObject
  1181.             (   LAYOUT_GetClass(),        NULL,
  1182.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1183.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1184.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1185.                 LAYOUT_BevelStyle,        BVS_NONE,
  1186.                 LAYOUT_AddChild,
  1187.                 NewObject
  1188.                 (   LAYOUT_GetClass(),        NULL,
  1189.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1190.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1191.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1192.                     LAYOUT_BevelStyle,        BVS_NONE,
  1193.                     LAYOUT_AddImage,          NewObject
  1194.                     (   LABEL_GetClass(),     NULL,
  1195.                         LABEL_Text,           "Driver:",
  1196.                         LABEL_Justification,  LJ_RIGHT,
  1197.                     TAG_END),
  1198.                 TAG_END),
  1199.                 LAYOUT_AddChild,
  1200.                 NewObject
  1201.                 (   LAYOUT_GetClass(),        NULL,
  1202.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1203.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1204.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1205.                     LAYOUT_BevelStyle,        BVS_NONE,
  1206.                     LAYOUT_AddImage,          NewObject
  1207.                     (   LABEL_GetClass(),     NULL,
  1208.                         LABEL_Text,           "Slot Address:",
  1209.                         LABEL_Justification,  LJ_RIGHT,
  1210.                     TAG_END),
  1211.                 TAG_END),
  1212.                 LAYOUT_AddChild,
  1213.                 NewObject
  1214.                 (   LAYOUT_GetClass(),        NULL,
  1215.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1216.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1217.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1218.                     LAYOUT_BevelStyle,        BVS_NONE,
  1219.                     LAYOUT_AddImage,          NewObject
  1220.                     (   LABEL_GetClass(),     NULL,
  1221.                         LABEL_Text,           "Slot Size:",
  1222.                         LABEL_Justification,  LJ_RIGHT,
  1223.                     TAG_END),
  1224.                 TAG_END),
  1225.             TAG_END),
  1226.             LAYOUT_AddChild,
  1227.             NewObject
  1228.             (   LAYOUT_GetClass(),        NULL,
  1229.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1230.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1231.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1232.                 LAYOUT_BevelStyle,        BVS_NONE,
  1233.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST6] =
  1234.                 NewObject
  1235.                 (   STRING_GetClass(),    NULL,
  1236.                     GA_ReadOnly,          TRUE,
  1237.                     GA_ID,                GID_5_ST6,
  1238.                     STRINGA_TextVal,      "-",
  1239.                     STRINGA_MinVisible,   9,
  1240.                 TAG_END),
  1241.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST10] =
  1242.                 NewObject
  1243.                 (   STRING_GetClass(),    NULL,
  1244.                     GA_ReadOnly,          TRUE,
  1245.                     GA_ID,                GID_5_ST10,
  1246.                     STRINGA_TextVal,      "-",
  1247.                     STRINGA_MinVisible,   9,
  1248.                 TAG_END),
  1249.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST11] =
  1250.                 NewObject
  1251.                 (   STRING_GetClass(),    NULL,
  1252.                     GA_ReadOnly,          TRUE,
  1253.                     GA_ID,                GID_5_ST11,
  1254.                     STRINGA_TextVal,      "-",
  1255.                     STRINGA_MinVisible,   9,
  1256.                 TAG_END),
  1257.             TAG_END),
  1258.         TAG_END),
  1259.         CHILD_WeightedHeight,         0,
  1260.         LAYOUT_AddChild,
  1261.         NewObject
  1262.         (   LAYOUT_GetClass(),        NULL,
  1263.             LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1264.             LAYOUT_SpaceOuter,        TRUE,
  1265.             LAYOUT_HorizAlignment,    LALIGN_CENTER,
  1266.             LAYOUT_VertAlignment,     LALIGN_CENTER,
  1267.             LAYOUT_BevelStyle,        BVS_NONE,
  1268.             LAYOUT_AddChild,          manuf_gadgets[GID_5_CB1] =
  1269.             NewObject
  1270.             (   CHECKBOX_GetClass(),  NULL,
  1271.                 GA_ID,                GID_5_CB1,
  1272.                 GA_RelVerify,         TRUE,
  1273.                 GA_Disabled,          TRUE,
  1274.                 GA_Text,              "Internal?",
  1275.                 TAG_END
  1276.             ),
  1277.             CHILD_WeightedWidth,      0,
  1278.             LAYOUT_AddChild,          manuf_gadgets[GID_5_CB2] =
  1279.             NewObject
  1280.             (   CHECKBOX_GetClass(),  NULL,
  1281.                 GA_ID,                GID_5_CB2,
  1282.                 GA_RelVerify,         TRUE,
  1283.                 GA_Disabled,          TRUE,
  1284.                 GA_Text,              "Official?",
  1285.                 TAG_END
  1286.             ),
  1287.             CHILD_WeightedWidth,      0,
  1288.             LAYOUT_AddImage,          NewObject
  1289.             (   LABEL_GetClass(),     NULL,
  1290.                 LABEL_Text,           "",
  1291.                 TAG_END
  1292.             ),
  1293.             CHILD_WeightedWidth,      100,
  1294.         TAG_END),
  1295.         CHILD_WeightedHeight,         0,
  1296.         LAYOUT_AddChild,
  1297.         NewObject
  1298.         (   LAYOUT_GetClass(),        NULL,
  1299.             LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1300.             LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1301.             LAYOUT_VertAlignment,     LALIGN_CENTER,
  1302.             LAYOUT_BevelStyle,        BVS_NONE,
  1303.             LAYOUT_AddChild,
  1304.             NewObject
  1305.             (   LAYOUT_GetClass(),        NULL,
  1306.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1307.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1308.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1309.                 LAYOUT_BevelStyle,        BVS_NONE,
  1310.                 LAYOUT_AddChild,
  1311.                 NewObject
  1312.                 (   LAYOUT_GetClass(),        NULL,
  1313.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1314.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1315.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1316.                     LAYOUT_BevelStyle,        BVS_NONE,
  1317.                     LAYOUT_AddImage,          NewObject
  1318.                     (   LABEL_GetClass(),     NULL,
  1319.                         LABEL_Text,           "CPU:",
  1320.                         LABEL_Justification,  LJ_RIGHT,
  1321.                     TAG_END),
  1322.                 TAG_END),
  1323.             TAG_END),
  1324.             CHILD_WeightedWidth,          0,
  1325.             LAYOUT_AddChild,
  1326.             NewObject
  1327.             (   LAYOUT_GetClass(),        NULL,
  1328.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1329.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1330.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1331.                 LAYOUT_BevelStyle,        BVS_NONE,
  1332.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST12] =
  1333.                 NewObject
  1334.                 (   STRING_GetClass(),    NULL,
  1335.                     GA_ReadOnly,          TRUE,
  1336.                     GA_ID,                GID_5_ST12,
  1337.                     STRINGA_TextVal,      cpustring,
  1338.                     STRINGA_MinVisible,   9,
  1339.                 TAG_END),
  1340.             TAG_END),
  1341.             CHILD_WeightedWidth,          50,
  1342.             LAYOUT_AddChild,
  1343.             NewObject
  1344.             (   LAYOUT_GetClass(),        NULL,
  1345.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1346.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1347.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1348.                 LAYOUT_BevelStyle,        BVS_NONE,
  1349.                 LAYOUT_AddChild,
  1350.                 NewObject
  1351.                 (   LAYOUT_GetClass(),        NULL,
  1352.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1353.                     LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1354.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  1355.                     LAYOUT_BevelStyle,        BVS_NONE,
  1356.                     LAYOUT_AddImage,          NewObject
  1357.                     (   LABEL_GetClass(),     NULL,
  1358.                         LABEL_Text,           "FPU:",
  1359.                         LABEL_Justification,  LJ_RIGHT,
  1360.                     TAG_END),
  1361.                 TAG_END),
  1362.             TAG_END),
  1363.             CHILD_WeightedWidth,          0,
  1364.             LAYOUT_AddChild,
  1365.             NewObject
  1366.             (   LAYOUT_GetClass(),        NULL,
  1367.                 LAYOUT_Orientation,       LAYOUT_ORIENT_VERT,
  1368.                 LAYOUT_HorizAlignment,    LALIGN_RIGHT,
  1369.                 LAYOUT_VertAlignment,     LALIGN_CENTER,
  1370.                 LAYOUT_BevelStyle,        BVS_NONE,
  1371.                 LAYOUT_AddChild,          manuf_gadgets[GID_5_ST13] =
  1372.                 NewObject
  1373.                 (   STRING_GetClass(),    NULL,
  1374.                     GA_ReadOnly,          TRUE,
  1375.                     GA_ID,                GID_5_ST13,
  1376.                     STRINGA_TextVal,      fpustring,
  1377.                     STRINGA_MinVisible,   9,
  1378.                 TAG_END),
  1379.             TAG_END),
  1380.             CHILD_WeightedWidth,          50,
  1381.         TAG_END),
  1382.         CHILD_WeightedHeight,             0,
  1383.         LAYOUT_AddChild,
  1384.         NewObject
  1385.         (   LAYOUT_GetClass(),        NULL,
  1386.             LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1387.             LAYOUT_SpaceOuter,        TRUE,
  1388.             LAYOUT_HorizAlignment,    LALIGN_CENTER,
  1389.             LAYOUT_VertAlignment,     LALIGN_CENTER,
  1390.             LAYOUT_BevelStyle,        BVS_NONE,
  1391.             LAYOUT_AddImage,          NewObject
  1392.             (   LABEL_GetClass(),     NULL,
  1393.                 // label
  1394.                 LABEL_Text,           "P_recedence:",
  1395.                 LABEL_Justification,  LJ_RIGHT,
  1396.                 TAG_END
  1397.             ),
  1398.             CHILD_WeightedWidth,      0,
  1399.             LAYOUT_AddChild,          manuf_gadgets[GID_5_CH1] =
  1400.             NewObject
  1401.             (   CHOOSER_GetClass(),   NULL,
  1402.                 GA_ID,                GID_5_CH1,
  1403.                 GA_RelVerify,         TRUE, // otherwise we won't hear the gadget
  1404.                 CHOOSER_PopUp,        TRUE,
  1405.                 CHOOSER_Labels,       &ManufChooserList,
  1406.                 CHOOSER_Selected,     (WORD) precedence,
  1407.                 TAG_END
  1408.             ),
  1409.             CHILD_WeightedWidth,      0,
  1410.             LAYOUT_AddImage,          NewObject
  1411.             (   LABEL_GetClass(),     NULL,
  1412.                 LABEL_Text,           "",
  1413.                 TAG_END
  1414.             ),
  1415.             CHILD_WeightedWidth,      100,
  1416.         TAG_END),
  1417.         CHILD_WeightedHeight,             0,
  1418.         LAYOUT_AddChild,                  NewObject
  1419.         (   LAYOUT_GetClass(),            NULL,
  1420.             LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  1421.             LAYOUT_VertAlignment,         LALIGN_CENTER,
  1422.             LAYOUT_HorizAlignment,        LALIGN_CENTER,
  1423.             LAYOUT_BevelStyle,            BVS_NONE,
  1424.             LAYOUT_AddChild,              manuf_gadgets[GID_5_BU1] =
  1425.             NewObject
  1426.             (   NULL,                     "button.gadget",
  1427.                 // button
  1428.                 GA_ID,                    GID_5_BU1,
  1429.                 GA_RelVerify,             TRUE,
  1430.                 GA_Text,                  "_Previous Card",
  1431.                 TAG_END
  1432.             ),
  1433.             CHILD_WeightedWidth,          50,
  1434.             LAYOUT_AddChild,              manuf_gadgets[GID_5_BU2] =
  1435.             NewObject
  1436.             (   NULL,                     "button.gadget",
  1437.                 // button
  1438.                 GA_ID,                    GID_5_BU2,
  1439.                 GA_RelVerify,             TRUE,
  1440.                 GA_Text,                  "_Next Card",
  1441.                 TAG_END
  1442.             ),
  1443.             CHILD_WeightedWidth,          50,
  1444.         TAG_END),
  1445.         CHILD_WeightedHeight,             100,
  1446.     TAG_END),
  1447.     TAG_END
  1448.     )))
  1449.     {   rq("Can't create ReAction object(s)!");
  1450.     }
  1451.     unlockscreen();
  1452.  
  1453.     /* boards is the actual number of boards found. 0 to (board - 1).
  1454.     We actually use the [board] index as our 'spare' 'queryable' index. */
  1455.  
  1456.     openwindow();
  1457.     ActivateLayoutGadget(manuf_gadgets[GID_5_LY1], MainWindowPtr, NULL, (Object) manuf_gadgets[GID_5_IN1]);
  1458.     updatemanuf();
  1459.     loop();
  1460.     closewindow();
  1461. }
  1462.  
  1463. AGLOBAL void manuf_loop(ULONG gid)
  1464. {   switch(gid)
  1465.     {
  1466.     case GID_5_BU1:
  1467.         whichboard--;
  1468.         updatemanuf();
  1469.     break;
  1470.     case GID_5_BU2:
  1471.         whichboard++;
  1472.         updatemanuf();
  1473.     break;
  1474.     case GID_5_CH1:
  1475.         if (!(GetAttr
  1476.         (   CHOOSER_Selected, manuf_gadgets[GID_5_CH1], (ULONG *) &precedence
  1477.         )))
  1478.         {   rq("Unsupported inquiry!"); // should never happen
  1479.         }
  1480.         autoquery();
  1481.     break;
  1482.     case GID_5_IN1:
  1483.         autoquery();
  1484.     break;
  1485.     case GID_5_IN2:
  1486.         autoquery();
  1487.     break;
  1488.     default:
  1489.     break;
  1490. }   }
  1491.  
  1492. AGLOBAL void manuf_die(void)
  1493. {   IOBuffer[20] = (UBYTE) precedence;
  1494. }
  1495. AGLOBAL void manuf_config(void)
  1496. {   precedence = (ULONG) IOBuffer[20];
  1497. }
  1498.  
  1499. MODULE void checklibrary(ULONG whichmanuf, ULONG whichproduct)
  1500. {   foundmanuf = foundproduct = FALSE;
  1501.  
  1502.     if (BoardsBase)
  1503.     {   if (GetBoardName(manuf_buffer, product_buffer, NULL, whichmanuf, whichproduct))
  1504.         {   SetGadgetAttrs
  1505.             (   manuf_gadgets[GID_5_ST2], MainWindowPtr, NULL,
  1506.                 STRINGA_TextVal, manuf_buffer,
  1507.                 TAG_END
  1508.             );
  1509.             SetGadgetAttrs
  1510.             (   manuf_gadgets[GID_5_ST3], MainWindowPtr, NULL,
  1511.                 STRINGA_TextVal, product_buffer,
  1512.                 TAG_END
  1513.             );
  1514.             SetGadgetAttrs
  1515.             (   manuf_gadgets[GID_5_ST4], MainWindowPtr, NULL,
  1516.                 STRINGA_TextVal, "-",
  1517.                 TAG_END
  1518.             );
  1519.             foundmanuf = foundproduct = TRUE;
  1520.             return; // successful
  1521.     }   }
  1522.     return; // unsuccessful
  1523. }
  1524.  
  1525. MODULE void checkinternal(ULONG whichmanuf, ULONG whichproduct)
  1526. {   SWORD i, /* i must be signed and at least 16 bits wide */
  1527.           j;
  1528.  
  1529.     foundmanuf = foundproduct = FALSE;
  1530.     for (i = 0; i <= MANUFS; i++) // go through each manufacturer
  1531.     {   for (j = 0; j <= 2; j++)  // each manufacturer has up to 3 IDs
  1532.         {   if (whichmanuf == manuf[i].number[j])
  1533.             {   selectedmanuf = i;
  1534.                 foundmanuf = TRUE;
  1535.                 SetGadgetAttrs
  1536.                 (   manuf_gadgets[GID_5_ST2], MainWindowPtr, NULL,
  1537.                     STRINGA_TextVal, manuf[selectedmanuf].name,
  1538.                     TAG_END
  1539.                 );
  1540.                 SetGadgetAttrs
  1541.                 (   manuf_gadgets[GID_5_CB1], MainWindowPtr, NULL,
  1542.                     GA_Selected, TRUE,
  1543.                     TAG_END
  1544.                 );
  1545.                 // official gadget has been already cleared by this point
  1546.                 if (j < manuf[i].howmany)
  1547.                 {   SetGadgetAttrs
  1548.                     (   manuf_gadgets[GID_5_CB2], MainWindowPtr, NULL,
  1549.                         GA_Selected, TRUE,
  1550.                         TAG_END
  1551.                     );
  1552.                 }
  1553.  
  1554.                 selectedproduct = (UWORD) ~0;
  1555.                 for (i = 0; i <= PRODUCTS; i++)
  1556.                 {   if (whichmanuf == product[i].manufid)
  1557.                     {   for (j = 0; j <= 1; j++)
  1558.                         {   if (whichproduct == product[i].number[j])
  1559.                             {   selectedproduct = i;
  1560.                                 // show product details
  1561.                                 SetGadgetAttrs
  1562.                                 (   manuf_gadgets[GID_5_ST3], MainWindowPtr, NULL,
  1563.                                     STRINGA_TextVal, product[selectedproduct].name,
  1564.                                     TAG_END
  1565.                                 );
  1566.                                 SetGadgetAttrs
  1567.                                 (   manuf_gadgets[GID_5_ST4], MainWindowPtr, NULL,
  1568.                                     STRINGA_TextVal, product[selectedproduct].desc,
  1569.                                     TAG_END
  1570.                                 );
  1571.                                 foundproduct = TRUE;
  1572.                                 return; // found both
  1573.                 }   }   }   }
  1574.                 return; // found manuf only
  1575.     }   }   }
  1576.     return; // completely unsuccessful
  1577. }
  1578.  
  1579. MODULE void nomanuf(void)
  1580. {   SetGadgetAttrs
  1581.     (   manuf_gadgets[GID_5_ST2], MainWindowPtr, NULL,
  1582.         STRINGA_TextVal, "-",
  1583.         TAG_END
  1584.     );
  1585. }
  1586.  
  1587. MODULE void noproduct(void)
  1588. {   SetGadgetAttrs
  1589.     (   manuf_gadgets[GID_5_ST3], MainWindowPtr, NULL,
  1590.         STRINGA_TextVal, "-",
  1591.         TAG_END
  1592.     );
  1593.     SetGadgetAttrs
  1594.     (   manuf_gadgets[GID_5_ST4], MainWindowPtr, NULL,
  1595.         STRINGA_TextVal, "-",
  1596.         TAG_END
  1597.     );
  1598. }
  1599.  
  1600. AGLOBAL ULONG Hook5Func(struct Hook *h, VOID *o, VOID *msg)
  1601. {   /* "When the hook is called, the data argument points to the 
  1602.     window object and message argument to the IntuiMessage." */
  1603.  
  1604.     UWORD code, qual;
  1605.  
  1606.     geta4(); // wait till here before doing anything
  1607.  
  1608.     code = ((struct IntuiMessage *) msg)->Code;
  1609.     qual = ((struct IntuiMessage *) msg)->Qualifier;
  1610.  
  1611.     switch(code)
  1612.     {
  1613.     case SCAN_HELP:
  1614.         helpabout();
  1615.     break;
  1616.     case SCAN_ESCAPE:
  1617.         if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  1618.         {   cleanexit(EXIT_SUCCESS);
  1619.         } else page = 0;
  1620.     break;
  1621.     case SCAN_R:
  1622.         if (precedence == 0)
  1623.         {   precedence = 1;
  1624.         } else
  1625.         {   // assert(precedence == 1);
  1626.             precedence = 0;
  1627.         }
  1628.         SetGadgetAttrs
  1629.         (   manuf_gadgets[GID_5_CH1], MainWindowPtr, NULL,
  1630.             CHOOSER_Selected, (WORD) precedence,
  1631.             TAG_END
  1632.         );
  1633.         autoquery();
  1634.     break;
  1635.     case SCAN_I:
  1636.         ActivateLayoutGadget(manuf_gadgets[GID_5_LY1], MainWindowPtr, NULL, (Object) manuf_gadgets[GID_5_IN1]);
  1637.     break;
  1638.     case SCAN_D:
  1639.         ActivateLayoutGadget(manuf_gadgets[GID_5_LY1], MainWindowPtr, NULL, (Object) manuf_gadgets[GID_5_IN2]);
  1640.     break;
  1641.     default:
  1642.     break;
  1643.     }
  1644.  
  1645.     return(1);
  1646. }
  1647.  
  1648. MODULE void autoquery(void)
  1649. {   if (!(GetAttr
  1650.     (   INTEGER_Number, manuf_gadgets[GID_5_IN1], (ULONG *) &querymanuf
  1651.     )))
  1652.     {   rq("Unsupported inquiry!"); // should never happen
  1653.     }
  1654.     if (!(GetAttr
  1655.     (   INTEGER_Number, manuf_gadgets[GID_5_IN2], (ULONG *) &queryproduct
  1656.     )))
  1657.     {   rq("Unsupported inquiry!"); // should never happen
  1658.     }
  1659.     runquery(querymanuf, queryproduct);
  1660. }
  1661.